{literal}
<script type="text/javascript">
    $(document).ready(function(){
        $("#form_unidade").validate({
            rules: {
                codigoarea: { required: true, number: true},
                nome: { required: true }
            },
            messages: {
                codigoarea: { required: "Obrigatorio", number: "Apenas numeros" },
                nome: "Obrigatorio"
            },
            submitHandler: function(form) {
				jqAjaxForm(form, "div_mensagem");
			}
        });
        
        $("#codigoarea").numeric();


        //POPULA COMBO TIPOTARIFA
        populaSelect("tipotarifa", "{/literal}{$_site.url}{literal}", "tipo-tarifa-telefonia/select-tipo-tarifa-telefonia?cod={/literal}{$codigoareatelefonia->tipotarifatelefonia_id}{literal}");
        
    }); //fecha $(
    
</script>
{/literal}
<form id="form_unidade" name="form_unidade" method="post" action="{$_site.url}{$acao}">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="mvTituloFundo">
				  <tr>
					<td>
					{if $codigoareatelefonia->id > 0}Editar{else}Novo{/if} Codigo &Aacute;rea de Telefonia
					<input type="hidden" name="cod" value="{$codigoareatelefonia->id}"/>
					</td>
				  </tr>
				</table>
    		<table width="100%" border="0" cellspacing="0" cellpadding="0">                
                <tr>
                  <td class="contForm">
                  
                  <table width="100%" border="0" cellspacing="3" cellpadding="0">
                      <tr>
                        <td valign="top" class="fundoTituloForm">Codigo de &Aacute;rea:</td>
                        <td width="70%" class="bordaFormResp"><input name="codigoarea" type="text" class="formulario" id="codigoarea" maxlength="9" value="{$codigoareatelefonia->vhr_codigoarea}" /></td>
                      </tr>
                      <tr>
                        <td valign="top" class="fundoTituloForm">Tipo tarifa:</td>
                        <td width="70%" class="bordaFormResp"><select name="tipotarifa" id="tipotarifa"></select></td>
                      </tr>
                  </table>
                  
                  </td>
                </tr>
        		<tr>
                  <td class="paddingTop15 paddingBottom15" align="center"><!-- === Botões ( Salvar e Limpar ) === -->
                      <span class="paddingRight15">
                      	<input type="submit" value="Salvar" class="botao">
                      </span>
                    <span class="paddingRight15">
                    <input name="limpar" type="reset" id="Limpar" value="Limpar" class="botao" />
                    </span>
                    <input type="button" value="Cancelar" onclick="cancelar(); return false;" class="botao">
                      <!-- Final === Botões ( Salvar e Limpar ) === -->                      </td>
                </tr>
              </table>	
    </form>
